#! /usr/bin/env python2.7

# The Driver class for running our DNA librarys
# 
# So far this is only able to run under python 2.7

__author__="James Harding, Dillon Graham, David Firestone"
__date__ ="$Apr 18, 2011 9:07:51 PM$"


if __name__ == "__main__":
    print("DNA Compare by James Harding, Dillon Graham, David Firestone")
    #c_wchar_p a = 'C:/SVN/SVNREPO/trunk/Bioinfo3a/USERDATA/M90848-dentist.txt', 'C:/SVN/SVNREPO/trunk/Bioinfo3a/USERDATA/M90855-patientA.txt', 'C:/SVN/cs3280oosd/BioInformatics/LargeOutput.txt', '-2','C:/SVN/SVNREPO/trunk/Bioinfo3a/other/'

import ctypes

CSTR_ARRAY = ctypes.c_char_p * 6
argv = CSTR_ARRAY("", "Data1.txt", "Data3.txt", "LargeOutput.txt", "-2","C:\BIOINFOREPO\Bioinfo3a\dataset") # the 1st argv is the program name
mylib = ctypes.CDLL('libbioinfo.dll')
main = mylib[388] 

main(6, argv)

#not sure which this is 52-56?
  #FileIO* input = new FileIO();
newFileIo = mylib[52]
from ctypes import *
inputInst = POINTER(newFileIo())
#//FileIO::CreateOutputFile(argv[3]);
createOutputFile = mylib[45]
#createOutputFile(argv[3])

#//FileIO::ChangeFile(argv[1]);
changeFile = mylib[43]
#changeFile(argv[1])
	
    #DNA *Dentist = new DNA(input->read());

#//FileIO::ChangeFile(argv[2]);
#changeFile(argv[2])

   # DNA *Patient = new DNA(input->read());

   # //creating a comparable object
   # CompareDNA *MyComparableDNA = new CompareDNA();
   
   # MyComparableDNA->standardScoringMatrix();
standardScoringMatrix = mylib[16]
standardScoringMatrix() 

print("Starting Needleman/Wunsch")
   
# MyComparableDNA->NeedlemanWunsch(Dentist, Patient, -2);
needlemanWunch = mylib[8]
#needlemanWunch(Dentist, Patient, -2)
   
#//MyComparableDNA->printTwoAlignedSequences(Dentist, Patient, "Needleman/Wunsch");
printTwoAlignedSequences = mylib[19]
#printTwoAlignedSequences(Dentist, Patient, "Needleman/Wunsch")

print("Starting Smith-Waterman")

   # MyComparableDNA->SmithWaterman(Dentist, Patient, -2, -1);
smithWaterman = mylib[6]
#smithWaterman(Dentist, Patient, -2, -1)

#//MyComparableDNA->printTwoAlignedSequences(Dentist, Patient, "Smith-Waterman");
#printTwoAlignedSequences(Dentist, Patient, "Smith-Waterman")


	
	

